<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>This is PyScript Simple Demo</title>
    <link rel="stylesheet" href="https://pyscript.net/latest/pyscript.css">
    <script defer src="https://pyscript.net/latest/pyscript.js"></script>
    <style>
{#        给py-script标签添加样式  #}
        py-script {
            width: 500px;
            height: 300px;
            font-size: 20px;
            text-align: center;
            position: absolute;
            background-color: aqua;
        }
    </style>
</head>
<body>
    <py-script>print("this is Python code")
# 这是Python注释  下面的Python代码得贴边
from datetime import datetime
now = datetime.now()
now.strftime("%m/%d/%Y, %H:%M:%S")
    </py-script>
</body>
</html>